package com.service.healthycode.service;

import com.service.config.dto.ScreenUserDto;
import com.service.healthycode.dto.CheckTenantDto;
import com.service.healthycode.entity.CloudCampusInfo;

import java.util.List;
import java.util.Map;

/**
 * openApi用户表(CloudCampusInfo)表服务接口
 *
 * @author makejava
 * @since 2021-10-21 14:14:31
 */
public interface CloudCampusInfoService {

    /**
     * 通过ID查询单条数据
     *
     * @param id 主键
     * @return 实例对象
     */
    CloudCampusInfo queryById(String id);

    /**
     * 查询多条数据
     *
     * @param offset 查询起始位置
     * @param limit  查询条数
     * @return 对象列表
     */
    List<CloudCampusInfo> queryAllByLimit(int offset, int limit);

    /**
     * 新增数据
     *
     * @param cloudCampusInfo 实例对象
     * @return 实例对象
     */
    CloudCampusInfo insert(CloudCampusInfo cloudCampusInfo);

    /**
     * 修改数据
     *
     * @param cloudCampusInfo 实例对象
     * @return 实例对象
     */
    CloudCampusInfo update(CloudCampusInfo cloudCampusInfo);

    /**
     * 通过主键删除数据
     *
     * @param id 主键
     * @return 是否成功
     */
    boolean deleteById(String id);

    Map check(CheckTenantDto checkTenantDto, String userId);

    List<CloudCampusInfo> insertOrUpdate(CloudCampusInfo strictMap, String userId);

    void updateApiAccount(CloudCampusInfo strictMap);

    void serviceStatusBind(String screen_user_id, Boolean status, String userId, String domain);

    List<ScreenUserDto> queryAll(String userId);

    CloudCampusInfo freshSecret(String userId);

    void updateValidator(String screen_id, String validator);

    List<CloudCampusInfo> queryByValidator(String validator);

    CloudCampusInfo queryBySecret(String secret);
}
